#include "stdafx.h"
#include "LitScriptEngineNativeAPI.h"
#include "LitScriptEngine.h"
#include "LitScriptEngineOgreWrappers.h"

using namespace Lit::ScriptWrappers;

namespace Lit
{
	void NativeScriptAPI::registerOgreColourValue( )
	{
		int r = 0;
		r = SC_OBJECT_CONSTRUCT( engine->data(), "ColourValue", "void f()", asFUNCTION(ColourWrp::Construct0), asCALL_CDECL_OBJLAST );assert( r>=0 );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "ColourValue", "void f( const ColourValue& in )", asFUNCTION(ColourWrp::ConstructCopy), asCALL_CDECL_OBJLAST );assert( r>=0 );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "ColourValue", "void f( Real r=1.0f, Real g=1.0f, Real b=1.0f, Real a=1.0f )", asFUNCTION(ColourWrp::Construct4), asCALL_CDECL_OBJFIRST );assert( r>=0 );
		r = engine->setDefaultNamespace("Ogre::ColourValue_");
		r = engine->data()->RegisterGlobalProperty( "const Ogre::ColourValue ZERO", (void*)&Ogre::ColourValue::ZERO );assert( r>=0 );
		r = engine->data()->RegisterGlobalProperty( "const Ogre::ColourValue White", (void*)&Ogre::ColourValue::White );assert( r>=0 );
		r = engine->data()->RegisterGlobalProperty( "const Ogre::ColourValue Black", (void*)&Ogre::ColourValue::Black );assert( r>=0 );
		r = engine->data()->RegisterGlobalProperty( "const Ogre::ColourValue Blue", (void*)&Ogre::ColourValue::Blue );assert( r>=0 );
		r = engine->data()->RegisterGlobalProperty( "const Ogre::ColourValue Red", (void*)&Ogre::ColourValue::Red );assert( r>=0 );
		r = engine->data()->RegisterGlobalProperty( "const Ogre::ColourValue Green", (void*)&Ogre::ColourValue::Green );assert( r>=0 );
		r = engine->setDefaultNamespace("Ogre");

		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "bool opEquals( const ColourValue &in ) const", asMETHOD(Ogre::ColourValue, operator==), asCALL_THISCALL );assert( r>=0 );
		r = SC_OBJECT_PROP( engine->data(), "ColourValue", "float r", asOFFSET( Ogre::ColourValue, r ) ); assert( r>=0 );
		r = SC_OBJECT_PROP( engine->data(), "ColourValue", "float g", asOFFSET( Ogre::ColourValue, g ) ); assert( r>=0 );
		r = SC_OBJECT_PROP( engine->data(), "ColourValue", "float b", asOFFSET( Ogre::ColourValue, b ) ); assert( r>=0 );
		r = SC_OBJECT_PROP( engine->data(), "ColourValue", "float a", asOFFSET( Ogre::ColourValue, a ) ); assert( r>=0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "RGBA getAsRGBA() const", asMETHOD( Ogre::ColourValue, getAsRGBA ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "RGBA getAsARGB() const", asMETHOD( Ogre::ColourValue, getAsARGB ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "RGBA getAsBGRA() const", asMETHOD( Ogre::ColourValue, getAsBGRA ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "RGBA getAsABGR() const", asMETHOD( Ogre::ColourValue, getAsABGR ), asCALL_THISCALL ); assert( r>=0 );

		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "void setAsRGBA(const RGBA val)", asMETHOD( Ogre::ColourValue, setAsRGBA ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "void setAsARGB(const ARGB val)", asMETHOD( Ogre::ColourValue, setAsARGB ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "void setAsBGRA(const BGRA val)", asMETHOD( Ogre::ColourValue, setAsBGRA ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "void setAsABGR(const ABGR val)", asMETHOD( Ogre::ColourValue, setAsABGR ), asCALL_THISCALL ); assert( r>=0 );

		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "void saturate(void)", asMETHOD( Ogre::ColourValue, saturate ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "ColourValue saturateCopy(void) const", asMETHOD( Ogre::ColourValue, saturateCopy ), asCALL_THISCALL ); assert( r>=0 );

		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "ColourValue opAdd( const ColourValue &in ) const", asMETHODPR( Ogre::ColourValue, operator+,( const Ogre::ColourValue & ) const, Ogre::ColourValue ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "ColourValue opSub( const ColourValue &in ) const", asMETHODPR( Ogre::ColourValue, operator-,( const Ogre::ColourValue & ) const, Ogre::ColourValue ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "ColourValue opMul( const ColourValue &in ) const", asMETHODPR( Ogre::ColourValue, operator*,( const Ogre::ColourValue & ) const, Ogre::ColourValue ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "ColourValue opMul( const float ) const", asMETHODPR( Ogre::ColourValue, operator*,( const float ) const, Ogre::ColourValue ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "ColourValue opDiv( const ColourValue &in ) const", asMETHODPR( Ogre::ColourValue, operator/,( const Ogre::ColourValue & ) const, Ogre::ColourValue ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "ColourValue opDiv( const float ) const", asMETHODPR( Ogre::ColourValue, operator/,( const float ) const, Ogre::ColourValue ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "ColourValue& opAddAssign( const ColourValue &in )", asMETHODPR( Ogre::ColourValue, operator+=,( const Ogre::ColourValue & ), Ogre::ColourValue& ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "ColourValue& opSubAssign( const ColourValue &in )", asMETHODPR( Ogre::ColourValue, operator-=,( const Ogre::ColourValue & ), Ogre::ColourValue& ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "ColourValue& opMulAssign( const float )", asMETHODPR( Ogre::ColourValue, operator*=,( const float ), Ogre::ColourValue& ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "ColourValue& opDivAssign( const float )", asMETHODPR( Ogre::ColourValue, operator/=,( const float ), Ogre::ColourValue& ), asCALL_THISCALL ); assert( r>=0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "void setHSB(Real , Real , Real )", asMETHODPR( Ogre::ColourValue, setHSB,( Ogre::Real, Ogre::Real, Ogre::Real ), void ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "ColourValue", "void getHSB(Real &out, Real &out , Real &out) const", asMETHODPR( Ogre::ColourValue, getHSB,( Ogre::Real*, Ogre::Real*, Ogre::Real* ) const, void ), asCALL_THISCALL ); assert( r>=0 );

	}
	void NativeScriptAPI::registerOGRE( Ogre::SceneManager * mgr ){
		assert( engine->setDefaultNamespace( "Ogre" ) );

		registerOgrePrerequisites();
		registerOgreAngles();
		registerOgreVector2();
		registerOgreVector3();
		registerOgreVector4();
		registerOgreMatrix3();
		registerOgreMatrix4();
		registerOgreColourValue();
		registerOgreQuaternion();
		registerOgreAABB();
		registerOgreLog();
		registerOgreSceneNode( );
		registerOgreEntity( );
		registerOgreSceneManager( );
		registerOgreMovableObject( );
		assert( engine->setDefaultNamespace( "" ) );
	}
	void NativeScriptAPI::registerOgrePrerequisites( )
	{
		int r = 0;
		#if OGRE_DOUBLE_PRECISION == 1
			r=engine->data()->RegisterTypedef( "Real", "double"); assert(r>=0);
		#else
			r=engine->data()->RegisterTypedef( "Real", "float"); assert(r>=0);
		#endif

		r = engine->data()->RegisterTypedef( "RGBA", "uint32" ); assert(r>=0);
		r = engine->data()->RegisterTypedef( "ARGB", "uint32" ); assert(r>=0);
		r = engine->data()->RegisterTypedef( "ABGR", "uint32" ); assert(r>=0);
		r = engine->data()->RegisterTypedef( "BGRA", "uint32" ); assert(r>=0);

		r = engine->data()->RegisterEnum( "LoggingLevel" ); assert(r>=0);
		r = engine->data()->RegisterEnumValue( "LoggingLevel", "LL_LOW", Ogre::LL_LOW );
		r = engine->data()->RegisterEnumValue( "LoggingLevel", "LL_NORMAL", Ogre::LL_NORMAL );
		r = engine->data()->RegisterEnumValue( "LoggingLevel", "LL_BOREME", Ogre::LL_BOREME );

		r = engine->data()->RegisterEnum( "LogMessageLevel" ); assert(r>=0);
		r = engine->data()->RegisterEnumValue( "LogMessageLevel", "LML_TRIVIAL", Ogre::LML_TRIVIAL );
		r = engine->data()->RegisterEnumValue( "LogMessageLevel", "LML_NORMAL", Ogre::LML_NORMAL );
		r = engine->data()->RegisterEnumValue( "LogMessageLevel", "LML_CRITICAL", Ogre::LML_CRITICAL );
		
		r = SC_OBJECT(engine->data(), "LogManager",LogMgrWrp, asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CAK); assert(r>=0);
		r = SC_OBJECT(engine->data(), "Log",LogWrp, asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CAK); assert(r>=0);

		r = SC_OBJECT( engine->data(), "Radian", Ogre::Radian, asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CAK | asOBJ_APP_CLASS_ALLFLOATS ); assert( r >= 0 );
		r = SC_OBJECT( engine->data(), "Degree", Ogre::Degree, asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CAK | asOBJ_APP_CLASS_ALLFLOATS ); assert( r >= 0 );

		r = SC_OBJECT( engine->data(), "Vector2", Ogre::Vector2, asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CAK | asOBJ_APP_CLASS_ALLFLOATS ); assert( r >= 0 );
		r = SC_OBJECT( engine->data(), "Vector3", Ogre::Vector3, asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CAK | asOBJ_APP_CLASS_ALLFLOATS ); assert( r >= 0 );
		r = SC_OBJECT( engine->data(), "Vector4", Ogre::Vector4, asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CAK | asOBJ_APP_CLASS_ALLFLOATS ); assert( r >= 0 );

		r = SC_OBJECT( engine->data(), "ColourValue", Ogre::ColourValue, asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CAK | asOBJ_APP_CLASS_ALLFLOATS ); assert( r >= 0 );

		r = SC_OBJECT( engine->data(), "Quaternion", Ogre::Quaternion, asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CAK | asOBJ_APP_CLASS_ALLFLOATS ); assert( r >= 0 );
		r = SC_OBJECT( engine->data(), "Matrix3", Ogre::Matrix4, asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CAK | asOBJ_APP_CLASS_ALLFLOATS ); assert( r >= 0 );
		r = SC_OBJECT( engine->data(), "Matrix4", Ogre::Matrix3, asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CAK | asOBJ_APP_CLASS_ALLFLOATS ); assert( r >= 0 );
		r = SC_OBJECT( engine->data(), "AxisAlignedBox", Ogre::AxisAlignedBox, asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CAK ); assert( r >= 0 );
		
		/*r = SC_OBJECT(engine->data(), "MovableObject",Ogre::MovableObject, asOBJ_VALUE ); assert(r>=0);
		*/
		r = SC_OBJECT(engine->data(), "SceneNode", SceneNodeWrp, asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CAK ); assert(r>=0);
		r = SC_OBJECT(engine->data(), "SceneManager",SceneMgrWrp, asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CAK ); assert(r>=0);
		r = SC_OBJECT(engine->data(), "Entity",EntityWrp, asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CAK ); assert(r>=0);
		// Register the type
	}
	void NativeScriptAPI::registerOgreEntity( ){
		int r = 0;
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Entity", "void f()", asFUNCTION(EntityWrp::con_0), asCALL_CDECL_OBJLAST);
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Entity", "void f( const Entity &in )", asFUNCTION(EntityWrp::con_copy), asCALL_CDECL_OBJLAST);
		r = SC_OBJECT_METHOD( engine->data(), "Entity", "void detachFromParent()", asMETHOD(EntityWrp, detachFromParent), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "Entity", "::string getName() const", asMETHOD(EntityWrp, getName), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "Entity", "::string getMeshName() const", asMETHOD(EntityWrp, getMeshName), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "Entity", "::string getMaterialName( uint32 id = 0) const", asMETHOD(EntityWrp, getMaterialName), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneNode", "SceneNode getParentSceneNode( )", asMETHOD(EntityWrp, getParentSceneNode), asCALL_THISCALL);
	}
	void NativeScriptAPI::registerOgreSceneNode( ){
		int r = SC_OBJECT_CONSTRUCT( engine->data(), "SceneNode", "void f()", asFUNCTION(SceneNodeWrp::con_0), asCALL_CDECL_OBJLAST);
		r = SC_OBJECT_CONSTRUCT( engine->data(), "SceneNode", "void f( const SceneNode &in )", asFUNCTION(SceneNodeWrp::con_copy), asCALL_CDECL_OBJLAST);
		r = SC_OBJECT_METHOD( engine->data(), "SceneNode", "SceneNode createChildSceneNode()", asMETHODPR(SceneNodeWrp,createChildSceneNode, (), SceneNodeWrp), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneNode", "void setVisible( bool, bool cascade = true )", asMETHODPR(SceneNodeWrp, setVisible, (bool, bool), void), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneNode", "void attachObject( Entity &out )", asMETHODPR(SceneNodeWrp, attachObject, (EntityWrp&), void), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneNode", "void detachObject( Entity &out )", asMETHODPR(SceneNodeWrp, detachObject, (EntityWrp&), void), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneNode", "void detachAllObjects()", asMETHOD(SceneNodeWrp, detachAllObjects), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneNode", "void setPosition( const Vector3 &in )", asMETHODPR(SceneNodeWrp, setPosition,( const Ogre::Vector3 & ), void), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneNode", "void setPosition( Real, Real, Real )", asMETHODPR(SceneNodeWrp, setPosition, ( Real, Real, Real ), void), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneNode", "void setScale( const Vector3 &in )", asMETHODPR(SceneNodeWrp, setScale,( const Ogre::Vector3 & ), void), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneNode", "void setScale( Real, Real, Real )", asMETHODPR(SceneNodeWrp, setScale, ( Real, Real, Real ), void), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneNode", "void setOrientation( const Quaternion &in )", asMETHODPR(SceneNodeWrp, setOrientation,( const Ogre::Quaternion & ), void), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneNode", "void setOrientation( Real, Real, Real, Real )", asMETHODPR(SceneNodeWrp, setOrientation, ( Real, Real, Real, Real ), void), asCALL_THISCALL);

		r = SC_OBJECT_METHOD( engine->data(), "SceneNode", "Vector3 getPosition( ) const", asMETHODPR(SceneNodeWrp, getPosition,() const, Ogre::Vector3), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneNode", "Vector3 getScale( ) const", asMETHODPR(SceneNodeWrp, getScale,() const, Ogre::Vector3), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneNode", "Quaternion getOrientation( ) const", asMETHODPR(SceneNodeWrp, getOrientation,( ) const, Ogre::Quaternion), asCALL_THISCALL);
	}
	void NativeScriptAPI::registerOgreSceneManager( ){
		int r = SC_OBJECT_CONSTRUCT( engine->data(), "SceneManager", "void f()", asFUNCTION(SceneMgrWrp::con_0), asCALL_CDECL_OBJLAST);
		r = SC_OBJECT_CONSTRUCT( engine->data(), "SceneManager", "void f( const SceneManager &in )", asFUNCTION(SceneMgrWrp::con_copy), asCALL_CDECL_OBJLAST);
		r = SC_OBJECT_METHOD( engine->data(), "SceneManager", "SceneNode getRootSceneNode()", asMETHOD(SceneMgrWrp, getRootSceneNode), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneManager", "void clearScene()", asMETHOD(SceneMgrWrp, clearScene), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneManager", "void setSkyBox(bool, const ::string &in, Real a=5000.0f)", asMETHOD(SceneMgrWrp, setSkyBox), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneManager", "void setSkyDome(bool, const ::string &in, Real a=10.0f, Real b=8.0f, Real c=4000.0f )", asMETHOD(SceneMgrWrp, setSkyDome), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneManager", "void setAmbientLight( Real, Real, Real )", asMETHOD(SceneMgrWrp, setAmbientLight), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneManager", "::string getName() const", asMETHOD(SceneMgrWrp, getName), asCALL_THISCALL);
		
		r = SC_OBJECT_METHOD( engine->data(), "SceneManager", "SceneNode getSceneNode(const ::string &in )", asMETHOD(SceneMgrWrp, getSceneNode), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneManager", "void destroySceneNode(SceneNode &out)", asMETHOD(SceneMgrWrp, destroySceneNode), asCALL_THISCALL);
		
		r = SC_OBJECT_METHOD( engine->data(), "SceneManager", "Entity createEntity(const ::string &in, const ::string &in a= \"\" )", asMETHODPR(SceneMgrWrp, createEntity, (const std::string &, const std::string &), EntityWrp), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneManager", "Entity getEntity(const ::string &in )", asMETHODPR(SceneMgrWrp, getEntity, (const std::string &), EntityWrp), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneManager", "void destroyEntity(Entity &out)", asMETHODPR(SceneMgrWrp, destroyEntity,(EntityWrp&), void), asCALL_THISCALL);
		r = SC_OBJECT_METHOD( engine->data(), "SceneManager", "void destroyEntity(const ::string &in)", asMETHODPR(SceneMgrWrp, destroyEntity,(const std::string &), void), asCALL_THISCALL);
	}
	void NativeScriptAPI::registerOgreQuaternion( )
	{
		int r = 0;
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Quaternion", "void f( Real w=1.0f, Real x=0.0f, Real y = 0.0f, Real z=0.0f )", asFUNCTION(QuaternionWrapper::Constructor4), asCALL_CDECL_OBJLAST ); assert( r>=0 );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Quaternion", "void f( const Matrix3 &in )", asFUNCTION(QuaternionWrapper::ConstructorMat3), asCALL_CDECL_OBJLAST ); assert( r>=0 );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Quaternion", "void f( const Quaternion &in )", asFUNCTION(QuaternionWrapper::CopyConstructor), asCALL_CDECL_OBJLAST ); assert( r>=0 );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Quaternion", "void f( const Radian &in, const Vector3 &in )", asFUNCTION(QuaternionWrapper::ConstructorAngle), asCALL_CDECL_OBJLAST ); assert( r>=0 );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Quaternion", "void f( const Vector3 &in, const Vector3 &in, const Vector3 &in )", asFUNCTION(QuaternionWrapper::ConstructorAxes), asCALL_CDECL_OBJLAST ); assert( r>=0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "void fromRotationMatrix( const Matrix3 &in )", asMETHODPR(Ogre::Quaternion,FromRotationMatrix,(const Ogre::Matrix3&), void), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "void toRotationMatrix( Matrix3 &in )", asMETHODPR(Ogre::Quaternion,ToRotationMatrix,(Ogre::Matrix3& ) const, void), asCALL_THISCALL ); assert( r>=0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "void fromAngleAxis( const Radian &in, const Vector3 &in )", asMETHODPR(Ogre::Quaternion,FromAngleAxis,(const Ogre::Radian& , const Ogre::Vector3& ), void), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "void toAngleAxis( Radian& out, Vector3& out ) const", asMETHODPR(Ogre::Quaternion,ToAngleAxis,(Ogre::Radian& , Ogre::Vector3& ) const, void), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "void toAngleAxis( Degree& out, Vector3& out ) const", asMETHODPR(Ogre::Quaternion,ToAngleAxis,(Ogre::Degree& , Ogre::Vector3& ) const, void), asCALL_THISCALL ); assert( r>=0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "void FromAxes( const Vector3& in, const Vector3& in, const Vector3& in ) const", asMETHODPR(Ogre::Quaternion,FromAxes,(const Ogre::Vector3&, const Ogre::Vector3&, const Ogre::Vector3& ), void), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "void ToAxes( Vector3& out, Vector3& out, Vector3& out ) const", asMETHODPR(Ogre::Quaternion,ToAxes,(Ogre::Vector3&, Ogre::Vector3&, Ogre::Vector3& ) const, void), asCALL_THISCALL ); assert( r>=0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "Vector3 xAxis( ) const", asMETHODPR(Ogre::Quaternion,xAxis,() const, Ogre::Vector3), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "Vector3 yAxis( ) const", asMETHODPR(Ogre::Quaternion,yAxis,() const, Ogre::Vector3), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "Vector3 zAxis( ) const", asMETHODPR(Ogre::Quaternion,zAxis,() const, Ogre::Vector3), asCALL_THISCALL ); assert( r>=0 );

		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "Quaternion opAdd( const Quaternion &in ) const", asMETHODPR( Ogre::Quaternion, operator+, (const Ogre::Quaternion&) const, Ogre::Quaternion), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "Quaternion opSub( const Quaternion &in ) const", asMETHODPR( Ogre::Quaternion, operator-, (const Ogre::Quaternion&) const, Ogre::Quaternion), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "Quaternion opMul( const Quaternion &in ) const", asMETHODPR( Ogre::Quaternion, operator*, (const Ogre::Quaternion&) const, Ogre::Quaternion), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "Quaternion opMul( Real ) const", asMETHODPR( Ogre::Quaternion, operator*, (Ogre::Real) const, Ogre::Quaternion), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "Quaternion opNeg( ) const", asMETHODPR( Ogre::Quaternion, operator-, () const, Ogre::Quaternion), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "bool opEquals( const Quaternion &in ) const", asMETHOD(Ogre::Quaternion,operator==), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "Real Dot( const Quaternion &in ) const", asMETHOD(Ogre::Quaternion,Dot), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "Real Norm( ) const", asMETHOD(Ogre::Quaternion,Norm), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "Real normalise( )", asMETHOD(Ogre::Quaternion,normalise), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "Real inverse( ) const", asMETHOD(Ogre::Quaternion,Inverse), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "Real unitInverse( ) const", asMETHOD(Ogre::Quaternion,UnitInverse), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "Real exp( ) const", asMETHOD(Ogre::Quaternion,Exp), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "Real log( ) const", asMETHOD(Ogre::Quaternion,Log), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "Vector3 opMul( const Vector3 &in ) const", asMETHODPR(Ogre::Quaternion, operator*, (const Ogre::Vector3 & ) const, Ogre::Vector3), asCALL_THISCALL ); assert( r>=0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "Radian getRoll( bool reprojectAxis = true ) const", asMETHOD(Ogre::Quaternion,getRoll), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "Radian getPitch( bool reprojectAxis = true ) const", asMETHOD(Ogre::Quaternion,getPitch), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "Radian getYaw( bool reprojectAxis = true ) const", asMETHOD(Ogre::Quaternion,getYaw), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "bool equals( const Quaternion &in, const Radian &in ) const", asMETHOD(Ogre::Quaternion,equals), asCALL_THISCALL ); assert( r>=0 );

		engine->setDefaultNamespace("Ogre::Quaternion_");
			engine->data()->RegisterGlobalFunction( "Ogre::Quaternion Slerp( Ogre::Real, const Ogre::Quaternion &in, const Ogre::Quaternion &in, bool shortestPath=false)", asFUNCTION( Ogre::Quaternion::Slerp ), asCALL_CDECL );
			engine->data()->RegisterGlobalFunction( "Ogre::Quaternion SlerpExtraSpins( Ogre::Real, const Ogre::Quaternion &in, const Ogre::Quaternion &in, int )", asFUNCTION( Ogre::Quaternion::SlerpExtraSpins ), asCALL_CDECL );
			engine->data()->RegisterGlobalFunction( "Ogre::Quaternion Intermediate( const Ogre::Quaternion &in, const Ogre::Quaternion &in, const Ogre::Quaternion &in, Ogre::Quaternion &out, Ogre::Quaternion &out )", asFUNCTION( Ogre::Quaternion::Intermediate), asCALL_CDECL );
			engine->data()->RegisterGlobalFunction( "Ogre::Quaternion Squad( Ogre::Real, const Ogre::Quaternion &in, const Ogre::Quaternion &in, const Ogre::Quaternion &in, const Ogre::Quaternion &in, bool shortestPath = false )", asFUNCTION( Ogre::Quaternion::Squad), asCALL_CDECL );
			engine->data()->RegisterGlobalFunction( "Ogre::Quaternion nlerp( Ogre::Real, const Ogre::Quaternion &in, const Ogre::Quaternion &in, bool shortestPath = false )", asFUNCTION( Ogre::Quaternion::Squad), asCALL_CDECL );
		r = engine->data()->RegisterGlobalProperty("const Ogre::Quaternion ZERO", (void*) & Ogre::Quaternion::ZERO); assert(r>=0);
		r = engine->data()->RegisterGlobalProperty("const Ogre::Quaternion IDENTITY", (void*) & Ogre::Quaternion::IDENTITY); assert(r>=0);
		engine->setDefaultNamespace("Ogre");
		r = SC_OBJECT_PROP( engine->data(), "Quaternion", "const Real msEpsilon", asOFFSET(Ogre::Quaternion, msEpsilon) ); assert( r>=0 );
		r = SC_OBJECT_PROP( engine->data(), "Quaternion", "Real w", asOFFSET(Ogre::Quaternion, w) ); assert( r>=0 );
		r = SC_OBJECT_PROP( engine->data(), "Quaternion", "Real x", asOFFSET(Ogre::Quaternion, x) ); assert( r>=0 );
		r = SC_OBJECT_PROP( engine->data(), "Quaternion", "Real y", asOFFSET(Ogre::Quaternion, y) ); assert( r>=0 );
		r = SC_OBJECT_PROP( engine->data(), "Quaternion", "Real z", asOFFSET(Ogre::Quaternion, z) ); assert( r>=0 );

		r = SC_OBJECT_METHOD( engine->data(), "Quaternion", "bool isNaN() const", asMETHOD(Ogre::Quaternion,isNaN), asCALL_THISCALL );
	}
	void NativeScriptAPI::registerOgreAABB( ){
		int r = 0;
		r = SC_OBJECT_CONSTRUCT( engine->data(), "AxisAlignedBox", "void f()", asFUNCTION(AABBWrapper::Constructor0), asCALL_CDECL_OBJLAST ); assert( r>=0 );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "AxisAlignedBox", "void f( const AxisAlignedBox &in )", asFUNCTION(AABBWrapper::ConstructorCopy), asCALL_CDECL_OBJLAST ); assert( r>=0 );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "AxisAlignedBox", "void f( Real, Real, Real, Real, Real, Real )", asFUNCTION(AABBWrapper::Constructor6), asCALL_CDECL_OBJLAST ); assert( r>=0 );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "AxisAlignedBox", "void f( const Vector3 &in, const Vector3 &in )", asFUNCTION(AABBWrapper::Constructor2), asCALL_CDECL_OBJLAST ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "const Vector3& getMinimum() const", asMETHODPR(Ogre::AxisAlignedBox, getMinimum, () const, const Ogre::Vector3& ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "Vector3& getMinimum()", asMETHODPR(Ogre::AxisAlignedBox, getMinimum, (), Ogre::Vector3& ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "const Vector3& getMaximum() const", asMETHODPR(Ogre::AxisAlignedBox, getMaximum, () const, const Ogre::Vector3& ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "Vector3& getMaximum()", asMETHODPR(Ogre::AxisAlignedBox, getMaximum, (), Ogre::Vector3& ), asCALL_THISCALL ); assert( r>=0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "void setMinimum( const Vector3 &in )", asMETHODPR(Ogre::AxisAlignedBox, setMinimum, (const Ogre::Vector3 &), void ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "void setMinimum( Ogre::Real, Ogre::Real, Ogre::Real )", asMETHODPR(Ogre::AxisAlignedBox, setMinimum, ( Ogre::Real, Ogre::Real, Ogre::Real), void ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "void setMinimumX( Ogre::Real )", asMETHODPR(Ogre::AxisAlignedBox, setMinimumX, ( Ogre::Real ), void ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "void setMinimumY( Ogre::Real )", asMETHODPR(Ogre::AxisAlignedBox, setMinimumY, ( Ogre::Real ), void ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "void setMinimumZ( Ogre::Real )", asMETHODPR(Ogre::AxisAlignedBox, setMinimumZ, ( Ogre::Real ), void ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "void setMaximum( const Vector3 &in )", asMETHODPR(Ogre::AxisAlignedBox, setMaximum, (const Ogre::Vector3 &), void ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "void setMaximum( Ogre::Real, Ogre::Real, Ogre::Real )", asMETHODPR(Ogre::AxisAlignedBox, setMaximum, ( Ogre::Real, Ogre::Real, Ogre::Real), void ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "void setMaximumX( Ogre::Real )", asMETHODPR(Ogre::AxisAlignedBox, setMaximumX, ( Ogre::Real ), void ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "void setMaximumY( Ogre::Real )", asMETHODPR(Ogre::AxisAlignedBox, setMaximumY, ( Ogre::Real ), void ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "void setMaximumZ( Ogre::Real )", asMETHODPR(Ogre::AxisAlignedBox, setMaximumZ, ( Ogre::Real ), void ), asCALL_THISCALL ); assert( r>=0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "void setExtents( const Vector3 &in, const Vector3 &in )", asMETHODPR(Ogre::AxisAlignedBox, setExtents, (const Ogre::Vector3&, const Ogre::Vector3& ), void ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "void setExtents( Ogre::Real , Ogre::Real , Ogre::Real , Ogre::Real , Ogre::Real , Ogre::Real  )", asMETHODPR(Ogre::AxisAlignedBox, setExtents, (Ogre::Real,Ogre::Real,Ogre::Real,Ogre::Real,Ogre::Real,Ogre::Real ), void ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "void merge( const AxisAlignedBox &in  )", asMETHODPR(Ogre::AxisAlignedBox, merge, (const Ogre::AxisAlignedBox&), void ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "void merge( const Vector3 &in  )", asMETHODPR(Ogre::AxisAlignedBox, merge, (const Ogre::Vector3&), void ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "void transform( const Matrix4 &in  )", asMETHODPR(Ogre::AxisAlignedBox, transform, (const Ogre::Matrix4&), void ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "void transformAffine( const Matrix4 &in  )", asMETHODPR(Ogre::AxisAlignedBox, transformAffine, (const Ogre::Matrix4&), void ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "void setNull( )", asMETHODPR(Ogre::AxisAlignedBox, setNull, (), void ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "bool isNull( ) const", asMETHODPR(Ogre::AxisAlignedBox, isNull, () const, bool ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "bool isFinite( ) const", asMETHODPR(Ogre::AxisAlignedBox, isFinite, () const, bool ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "bool isInfinite( ) const", asMETHODPR(Ogre::AxisAlignedBox, isInfinite, () const, bool ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "void setInfinite()", asMETHODPR(Ogre::AxisAlignedBox, setInfinite, (), void ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "bool intersects(const AxisAlignedBox &in) const", asMETHODPR(Ogre::AxisAlignedBox, intersects, (const Ogre::AxisAlignedBox&) const, bool ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "bool intersects(const Vector3 &in) const", asMETHODPR(Ogre::AxisAlignedBox, intersects, (const Ogre::Vector3&) const, bool ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "AxisAlignedBox intersection(const AxisAlignedBox &in) const", asMETHODPR(Ogre::AxisAlignedBox, intersection, (const Ogre::AxisAlignedBox& b2) const, Ogre::AxisAlignedBox  ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "Real volume() const", asMETHOD(Ogre::AxisAlignedBox, volume), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "void scale(const Vector3 &in)", asMETHOD(Ogre::AxisAlignedBox, scale), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "Vector3 getCenter() const", asMETHOD(Ogre::AxisAlignedBox, getCenter), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "Vector3 getSize() const", asMETHOD(Ogre::AxisAlignedBox, getSize), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "Vector3 getHalfSize() const", asMETHOD(Ogre::AxisAlignedBox, getHalfSize), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "bool contains( const Vector3 &in ) const", asMETHODPR(Ogre::AxisAlignedBox, contains, ( const Ogre::Vector3 & ) const, bool ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "bool contains( const AxisAlignedBox &in ) const", asMETHODPR(Ogre::AxisAlignedBox, contains, ( const Ogre::AxisAlignedBox & ) const, bool ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "AxisAlignedBox", "bool opEquals( const AxisAlignedBox &in ) const", asMETHODPR(Ogre::AxisAlignedBox, operator==, ( const Ogre::AxisAlignedBox & ) const, bool ), asCALL_THISCALL ); assert( r>=0 );
		
		engine->setDefaultNamespace("Ogre::AxisAlignedBox_" );
		r = engine->data()->RegisterGlobalProperty("const Ogre::AxisAlignedBox BOX_NULL", (void*) & Ogre::AxisAlignedBox::BOX_NULL); assert(r>=0);
		r = engine->data()->RegisterGlobalProperty("const Ogre::AxisAlignedBox BOX_INFINITE", (void*) & Ogre::AxisAlignedBox::BOX_INFINITE); assert(r>=0);
		engine->setDefaultNamespace("Ogre" );
		
		//engine->data()->RegisterGlobalProperty( "const AxisAlignedBox AxisAlignedBox::BOX_INFINITE", (void*)&Ogre::AxisAlignedBox::BOX_INFINITE );
		/*
		static const AxisAlignedBox BOX_NULL;
		static const AxisAlignedBox BOX_INFINITE;
		*/

		/*
		Vector3 getCorner(CornerEnum cornerToGet) const
		bool intersects(const Sphere& s) const
		bool intersects(const Plane& p) const
		*/
	}
		
	void NativeScriptAPI::registerOgreMovableObject( ){
		int r = 0;
		/*
		 /// Constructor
        MovableObject();
		MovableObject(const String& name);
		virtual SceneManager* _getManager(void) const { return mManager; }

		virtual const String& getName(void) const { return mName; }
        virtual const String& getMovableType(void) const = 0;
        virtual Node* getParentNode(void) const;
        virtual SceneNode* getParentSceneNode(void) const;
		virtual bool isParentTagPoint() const { return mParentIsTagPoint; }
        virtual bool isAttached(void) const;
		virtual void detachFromParent(void);
        virtual bool isInScene(void) const;
        virtual const AxisAlignedBox& getBoundingBox(void) const = 0;
		virtual Real getBoundingRadius(void) const = 0;
        virtual const AxisAlignedBox& getWorldBoundingBox(bool derive = false) const;
        virtual const Sphere& getWorldBoundingSphere(bool derive = false) const;
        virtual void setVisible(bool visible);
        virtual bool getVisible(void) const;
        virtual bool isVisible(void) const;
		virtual void setRenderingDistance(Real dist) { 
			mUpperDistance = dist; 
			mSquaredUpperDistance = mUpperDistance * mUpperDistance;
		}
		virtual Real getRenderingDistance(void) const { return mUpperDistance; }		
		virtual void setUserAny(const Any& anything) { getUserObjectBindings().setUserAny(anything); }
		virtual const Any& getUserAny(void) const { return getUserObjectBindings().getUserAny(); }
		UserObjectBindings&	getUserObjectBindings() { return mUserObjectBindings; }
		const UserObjectBindings& getUserObjectBindings() const { return mUserObjectBindings; }
        virtual void setRenderQueueGroup(uint8 queueID);
		virtual void setRenderQueueGroupAndPriority(uint8 queueID, ushort priority);

        virtual uint8 getRenderQueueGroup(void) const;
		virtual const Matrix4& _getParentNodeFullTransform(void) const;
        virtual void setQueryFlags(uint32 flags) { mQueryFlags = flags; }
        virtual void addQueryFlags(uint32 flags) { mQueryFlags |= flags; }
        virtual void removeQueryFlags(unsigned long flags) { mQueryFlags &= ~flags; }
        virtual uint32 getQueryFlags(void) const { return mQueryFlags; }
		static void setDefaultQueryFlags(uint32 flags) { msDefaultQueryFlags = flags; }
		static uint32 getDefaultQueryFlags() { return msDefaultQueryFlags; }
        virtual void setVisibilityFlags(uint32 flags) { mVisibilityFlags = flags; }
        virtual void addVisibilityFlags(uint32 flags) { mVisibilityFlags |= flags; }
        virtual void removeVisibilityFlags(uint32 flags) { mVisibilityFlags &= ~flags; }
        virtual uint32 getVisibilityFlags(void) const { return mVisibilityFlags; }
		static void setDefaultVisibilityFlags(uint32 flags) { msDefaultVisibilityFlags = flags; }
		static uint32 getDefaultVisibilityFlags() { return msDefaultVisibilityFlags; }

        virtual void setListener(Listener* listener) { mListener = listener; }
        virtual Listener* getListener(void) const { return mListener; }
        virtual const LightList& queryLights(void) const;
		virtual uint32 getLightMask()const { return mLightMask; }
		virtual void setLightMask(uint32 lightMask);

		virtual LightList* _getLightList() { return &mLightList; }

		/// Define a default implementation of method from ShadowCaster which implements no shadows
        EdgeData* getEdgeList(void) { return NULL; }
		/// Define a default implementation of method from ShadowCaster which implements no shadows
		bool hasEdgeList(void) { return false; }
        /// Define a default implementation of method from ShadowCaster which implements no shadows
        ShadowRenderableListIterator getShadowVolumeRenderableIterator(
            ShadowTechnique shadowTechnique, const Light* light, 
            HardwareIndexBufferSharedPtr* indexBuffer, 
            bool extrudeVertices, Real extrusionDist, unsigned long flags = 0);
        const AxisAlignedBox& getLightCapBounds(void) const;
        const AxisAlignedBox& getDarkCapBounds(const Light& light, Real dirLightExtrusionDist) const;
        void setCastShadows(bool enabled) { mCastShadows = enabled; }
        bool getCastShadows(void) const { return mCastShadows; }
		bool getReceivesShadows();
        Real getPointExtrusionDistance(const Light* l) const;
		virtual uint32 getTypeFlags(void) const;
		virtual void setDebugDisplayEnabled(bool enabled) { mDebugDisplay = enabled; }
		virtual bool isDebugDisplayEnabled(void) const { return mDebugDisplay; }
		*/
	}
	void NativeScriptAPI::registerOgreLog( )
	{
		int r = 0;		
		r = SC_OBJECT_CONSTRUCT(engine->data(), "LogManager","void f( )", asFUNCTION(LogMgrWrp::constructor0), asCALL_CDECL_OBJLAST ); assert(r>=0);
		r = SC_OBJECT_CONSTRUCT(engine->data(), "LogManager","void f( const LogManager &in )", asFUNCTION(LogMgrWrp::copy_constructor), asCALL_CDECL_OBJLAST ); assert(r>=0);
		/*engine->setDefaultNamespace("Ogre::LogManager");
			r=engine->data()->RegisterGlobalFunction( "Ogre::LogManager getSingleton()", asFUNCTION(LogMgrWrp::getSingleton), asCALL_CDECL); assert( r>=0 );
		engine->setDefaultNamespace("Ogre");*/
		
		r = SC_OBJECT_METHOD(engine->data(), "LogManager","Log createLog(const ::string &in)", asMETHOD( LogMgrWrp, createLog ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD(engine->data(), "LogManager","Log getLog(const ::string &in)", asMETHOD( LogMgrWrp, getLog ), asCALL_THISCALL );		
		r = SC_OBJECT_METHOD(engine->data(), "LogManager","Log getDefaultLog()", asMETHOD( LogMgrWrp, getDefaultLog ), asCALL_THISCALL );		
		r = SC_OBJECT_METHOD(engine->data(), "LogManager","void logMessage(const ::string &in)", asMETHOD( LogMgrWrp, logMessage ), asCALL_THISCALL );		
		r = SC_OBJECT_METHOD(engine->data(), "LogManager","void destroyLog( const ::string &in )", asMETHODPR( LogMgrWrp, destroyLog, (const std::string &), void ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD(engine->data(), "LogManager","void destroyLog( Log &out )", asMETHODPR( LogMgrWrp, destroyLog, (LogWrp&), void ), asCALL_THISCALL );
				
		r = SC_OBJECT_CONSTRUCT(engine->data(), "Log","void f()", asFUNCTION( LogWrp::Constructor0 ), asCALL_CDECL_OBJLAST );
		r = SC_OBJECT_CONSTRUCT(engine->data(), "Log","void f( const Log &in )", asFUNCTION( LogWrp::CopyConstructor ), asCALL_CDECL_OBJLAST );
		r = SC_OBJECT_CONSTRUCT(engine->data(), "Log","void f( const ::string &in )", asFUNCTION( LogWrp::CreateConstructor ), asCALL_CDECL_OBJLAST );

		r = SC_OBJECT_METHOD(engine->data(), "Log","::string getName() const", asMETHOD( LogWrp, getName ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD(engine->data(), "Log","bool isDebugOutputEnabled() const", asMETHOD( LogWrp, isDebugOutputEnabled ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD(engine->data(), "Log","bool isFileOutputSuppressed() const", asMETHOD( LogWrp, isFileOutputSuppressed ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD(engine->data(), "Log","bool isTimeStampEnabled() const", asMETHOD( LogWrp, isTimeStampEnabled ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD(engine->data(), "Log","void logMessage( const ::string &in, Ogre::LogMessageLevel lml = Ogre::LML_NORMAL, bool maskDebug = false )", asMETHOD( LogWrp, logMessage ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD(engine->data(), "Log","void setDebugOutputEnabled( bool )", asMETHOD( LogWrp, setDebugOutputEnabled ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD(engine->data(), "Log","void setLogDetail( Ogre::LoggingLevel )", asMETHOD( LogWrp, setLogDetail ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD(engine->data(), "Log","void setTimeStampEnabled(bool)", asMETHOD( LogWrp, setTimeStampEnabled ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD(engine->data(), "Log","Ogre::LoggingLevel getLogDetail() const", asMETHOD( LogWrp, getLogDetail ), asCALL_THISCALL );
	}
	void NativeScriptAPI::registerOgreAngles( )
	{		
		/**************************
				RADIANS
		************************/

		int r = SC_OBJECT_CONSTRUCT( engine->data(), "Radian", "void f()", asFUNCTION(RadianWrapper::Constructor0), asCALL_CDECL_OBJLAST );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Radian", "void f( const Radian & in )", asFUNCTION(RadianWrapper::CopyConstructor), asCALL_CDECL_OBJLAST );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Radian", "void f( Real )", asFUNCTION(RadianWrapper::RealConstructor), asCALL_CDECL_OBJLAST );
		r = SC_OBJECT_METHOD( engine->data(), "Radian", "Real valueDegrees() const", asMETHOD(Ogre::Radian, valueDegrees), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Radian", "Real valueRadians() const", asMETHOD(Ogre::Radian, valueRadians), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Radian", "Real valueAngleUnits() const", asMETHOD(Ogre::Radian, valueAngleUnits), asCALL_THISCALL ); assert( r>=0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Radian", "Radian opAdd(const Radian &in) const", asMETHODPR(Ogre::Radian, operator+, (const Ogre::Radian &) const, Ogre::Radian), asCALL_THISCALL); assert( r >= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Radian", "Radian opAdd(const Degree &in) const", asMETHODPR(Ogre::Radian, operator+, (const Ogre::Degree &) const, Ogre::Radian), asCALL_THISCALL); assert( r >= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Radian", "Radian& opAddAssign(const Radian &in)", asMETHODPR(Ogre::Radian, operator+=, (const Ogre::Radian &), Ogre::Radian&), asCALL_THISCALL); assert( r >= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Radian", "Radian& opAddAssign(const Degree &in)", asMETHODPR(Ogre::Radian, operator+=, (const Ogre::Degree &), Ogre::Radian&), asCALL_THISCALL); assert( r >= 0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Radian", "Radian opNeg() const", asMETHODPR( Ogre::Radian, operator -, () const, Ogre::Radian ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Radian", "Radian opSub( const Radian& in ) const", asMETHODPR( Ogre::Radian, operator -, ( const Ogre::Radian & ) const, Ogre::Radian ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Radian", "Radian opSub( const Degree& in ) const", asMETHODPR( Ogre::Radian, operator -, ( const Ogre::Degree & ) const, Ogre::Radian ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Radian", "Radian opSubAssign( const Radian& in )", asMETHODPR( Ogre::Radian, operator -=, ( const Ogre::Radian & ), Ogre::Radian& ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Radian", "Radian opSubAssign( const Degree& in )", asMETHODPR( Ogre::Radian, operator -=, ( const Ogre::Degree & ), Ogre::Radian& ), asCALL_THISCALL ); assert( r>= 0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Radian", "Radian opMul( Real ) const", asMETHODPR( Ogre::Radian, operator *, ( Ogre::Real ) const, Ogre::Radian ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Radian", "Radian opMul( const Radian& in ) const", asMETHODPR( Ogre::Radian, operator *, ( const Ogre::Radian&  ) const, Ogre::Radian ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Radian", "Radian opMulAssign( Real )", asMETHODPR( Ogre::Radian, operator *=, ( Real ), Ogre::Radian& ), asCALL_THISCALL ); assert( r>= 0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Radian", "Radian opDiv( Real )", asMETHODPR( Ogre::Radian, operator /, ( Real  ) const, Ogre::Radian ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Radian", "Radian opDivAssign( Real )", asMETHODPR( Ogre::Radian, operator /=, ( Real  ), Ogre::Radian& ), asCALL_THISCALL ); assert( r>= 0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Radian", "bool opEquals(const Radian &in) const", asMETHODPR(Ogre::Radian, operator==, (const Ogre::Radian &) const, bool), asCALL_THISCALL); assert( r >= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Radian", "int opCmp( const Radian& in ) const", asFUNCTION(RadianWrapper::Compare), asCALL_CDECL_OBJLAST); assert( r >= 0 );

		/**************************
				DEGREES
		************************/
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Degree", "void f()", asFUNCTION(DegreeWrapper::Constructor0), asCALL_CDECL_OBJLAST );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Degree", "void f( const Degree & in )", asFUNCTION(DegreeWrapper::CopyConstructor), asCALL_CDECL_OBJLAST );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Degree", "void f( Real )", asFUNCTION(DegreeWrapper::RealConstructor), asCALL_CDECL_OBJLAST );
		r = SC_OBJECT_METHOD( engine->data(), "Degree", "Real valueDegrees() const", asMETHOD(Ogre::Degree, valueDegrees), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Degree", "Real valueRadians() const", asMETHOD(Ogre::Degree, valueRadians), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Degree", "Real valueAngleUnits() const", asMETHOD(Ogre::Degree, valueAngleUnits), asCALL_THISCALL ); assert( r>=0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Degree", "Degree opAdd(const Radian &in) const", asMETHODPR(Ogre::Degree, operator+, (const Ogre::Radian &) const, Ogre::Degree), asCALL_THISCALL); assert( r >= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Degree", "Degree opAdd(const Degree &in) const", asMETHODPR(Ogre::Degree, operator+, (const Ogre::Degree &) const, Ogre::Degree), asCALL_THISCALL); assert( r >= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Degree", "Degree& opAddAssign(const Radian &in)", asMETHODPR(Ogre::Degree, operator+=, (const Ogre::Radian &), Ogre::Degree&), asCALL_THISCALL); assert( r >= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Degree", "Degree& opAddAssign(const Degree &in)", asMETHODPR(Ogre::Degree, operator+=, (const Ogre::Degree &), Ogre::Degree&), asCALL_THISCALL); assert( r >= 0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Degree", "Degree opNeg() const", asMETHODPR( Ogre::Degree, operator -, () const, Ogre::Degree ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Degree", "Degree opSub( const Radian& in ) const", asMETHODPR( Ogre::Degree, operator -, ( const Ogre::Radian & ) const, Ogre::Degree ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Degree", "Degree opSub( const Degree& in ) const", asMETHODPR( Ogre::Degree, operator -, ( const Ogre::Degree & ) const, Ogre::Degree ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Degree", "Degree opSubAssign( const Radian& in )", asMETHODPR( Ogre::Degree, operator -=, ( const Ogre::Radian & ), Ogre::Degree& ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Degree", "Degree opSubAssign( const Degree& in )", asMETHODPR( Ogre::Degree, operator -=, ( const Ogre::Degree & ), Ogre::Degree& ), asCALL_THISCALL ); assert( r>= 0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Degree", "Degree opMul( Real ) const", asMETHODPR( Ogre::Degree, operator *, ( Ogre::Real ) const, Ogre::Degree ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Degree", "Degree opMul( const Degree& in ) const", asMETHODPR( Ogre::Degree, operator *, ( const Ogre::Degree&  ) const, Ogre::Degree ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Degree", "Degree opMulAssign( Real )", asMETHODPR( Ogre::Degree, operator *=, ( Real ), Ogre::Degree& ), asCALL_THISCALL ); assert( r>= 0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Degree", "Degree opDiv( Real )", asMETHODPR( Ogre::Degree, operator /, ( Real  ) const, Ogre::Degree ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Degree", "Degree opDivAssign( Real )", asMETHODPR( Ogre::Degree, operator /=, ( Real  ), Ogre::Degree& ), asCALL_THISCALL ); assert( r>= 0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Degree", "bool opEquals(const Degree &in) const", asMETHODPR(Ogre::Degree, operator==, (const Ogre::Degree &) const, bool), asCALL_THISCALL); assert( r >= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Degree", "int opCmp( const Degree& in ) const", asFUNCTION(DegreeWrapper::Compare), asCALL_CDECL_OBJLAST); assert( r >= 0 );
	}
	void NativeScriptAPI::registerOgreVector3( )
	{
		/**************************
				VECTOR3
		************************/

		int r = 0;
		
		// Register the constructors
		r = engine->data()->RegisterObjectBehaviour("Vector3", asBEHAVE_CONSTRUCT,  "void f()",                    asFUNCTION(Vector3Wrapper::Constructor0), asCALL_CDECL_OBJLAST); assert( r >= 0 );
		r = engine->data()->RegisterObjectBehaviour("Vector3", asBEHAVE_CONSTRUCT,  "void f(Real)",  asFUNCTION(Vector3Wrapper::Constructor1), asCALL_CDECL_OBJLAST); assert( r >= 0 );
		r = engine->data()->RegisterObjectBehaviour("Vector3", asBEHAVE_CONSTRUCT,  "void f(Real, Real, Real)",  asFUNCTION(Vector3Wrapper::Constructor3), asCALL_CDECL_OBJLAST); assert( r >= 0 );
		r = engine->data()->RegisterObjectBehaviour("Vector3", asBEHAVE_CONSTRUCT,  "void f(const Vector3 &in)",   asFUNCTION(Vector3Wrapper::CopyConstructor), asCALL_CDECL_OBJLAST); assert( r >= 0 );
		
		// Register the operators
		r = engine->data()->RegisterObjectMethod("Vector3", "Vector3 opNeg( ) const", asMETHODPR( Ogre::Vector3, operator-, () const, Ogre::Vector3 ), asCALL_THISCALL ); assert( r>= 0 );      
		r = engine->data()->RegisterObjectMethod("Vector3", "Vector3 &opAddAssign(const Vector3 &in)", asMETHODPR(Ogre::Vector3, operator+=, (const Ogre::Vector3 &), Ogre::Vector3&), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Vector3 &opSubAssign(const Vector3 &in)", asMETHODPR(Ogre::Vector3, operator-=, (const Ogre::Vector3 &), Ogre::Vector3&), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Vector3 &opMulAssign(const Vector3 &in)", asMETHODPR(Ogre::Vector3, operator*=, (const Ogre::Vector3 &), Ogre::Vector3&), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Vector3 &opDivAssign(const Vector3 &in)", asMETHODPR(Ogre::Vector3, operator/=, (const Ogre::Vector3 &), Ogre::Vector3&), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Vector3 &opMulAssign(Real)", asMETHODPR(Ogre::Vector3, operator*=, ( float ), Ogre::Vector3&), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Vector3 &opDivAssign(Real)", asMETHODPR(Ogre::Vector3, operator/=, ( float ), Ogre::Vector3&), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "bool opEquals(const Vector3 &in) const", asMETHODPR(Ogre::Vector3, operator==, (const Ogre::Vector3 &) const, bool), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Vector3 opAdd(const Vector3 &in) const", asMETHODPR(Ogre::Vector3, operator+, (const Ogre::Vector3 &) const, Ogre::Vector3), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Vector3 opSub(const Vector3 &in) const", asMETHODPR(Ogre::Vector3, operator-, (const Ogre::Vector3 &) const, Ogre::Vector3), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Vector3 opMul(const Vector3 &in) const", asMETHODPR(Ogre::Vector3, operator*, (const Ogre::Vector3 &) const, Ogre::Vector3), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Vector3 opDiv( const Vector3 &in ) const", asMETHODPR(Ogre::Vector3, operator/, (const Ogre::Vector3 &) const, Ogre::Vector3), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Vector3 opMul( Real ) const", asMETHODPR(Ogre::Vector3, operator*, (float) const, Ogre::Vector3), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Vector3 opDiv( Real ) const", asMETHODPR(Ogre::Vector3, operator/, ( float ) const, Ogre::Vector3), asCALL_THISCALL); assert( r >= 0 );

		r = engine->data()->RegisterObjectMethod("Vector3", "int opCmp( const Vector3& in ) const", asFUNCTION(Vector3Wrapper::Compare), asCALL_CDECL_OBJLAST); assert( r >= 0 );
		
		// Register the object methods
		r = engine->data()->RegisterObjectMethod("Vector3", "Real length() const", asMETHOD(Ogre::Vector3,length), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Real squaredLength() const", asMETHOD(Ogre::Vector3,squaredLength), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Real distance() const", asMETHOD(Ogre::Vector3,distance), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Real squaredDistance() const", asMETHOD(Ogre::Vector3,squaredDistance), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Real dotProduct() const", asMETHOD(Ogre::Vector3,dotProduct), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Real absDotProduct() const", asMETHOD(Ogre::Vector3,absDotProduct), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Real normalise()", asMETHOD(Ogre::Vector3,normalise), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Vector3 crossProduct( const Vector3& in ) const", asMETHOD(Ogre::Vector3,crossProduct), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Vector3 midPoint( const Vector3& in ) const", asMETHOD(Ogre::Vector3,midPoint), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "void makeFloor( const Vector3& in )", asMETHOD(Ogre::Vector3,makeFloor), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "void makeCeil( const Vector3& in )", asMETHOD(Ogre::Vector3,makeCeil), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Vector3 perpendicular( ) const", asMETHOD(Ogre::Vector3,perpendicular), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Vector3 normalisedCopy( ) const", asMETHOD(Ogre::Vector3,normalisedCopy), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "bool isNaN( ) const", asMETHOD(Ogre::Vector3,isNaN), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "bool isZeroLength( ) const", asMETHOD(Ogre::Vector3,isZeroLength), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "bool positionEquals(const Vector3& in rhs, Real tolerance = 1e-03f) const", asMETHOD(Ogre::Vector3,positionEquals), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "bool positionCloses(const Vector3& in rhs, Real tolerance = 1e-03f) const", asMETHOD(Ogre::Vector3,positionCloses), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Vector3 reflect(const Vector3& in normal) const", asMETHOD(Ogre::Vector3,reflect), asCALL_THISCALL); assert( r >= 0 );
		
		r = engine->data()->RegisterObjectMethod("Vector3", "Vector3 randomDeviant( const Radian & in angle, const Vector3 & in up ) const", asMETHOD(Ogre::Vector3,perpendicular), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Radian angleBetween( const Vector3 & in dest ) const", asMETHOD(Ogre::Vector3,perpendicular), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "Quaternion getRotationTo( const Vector3 & in dest, const Vector3 & in axis ) const", asMETHOD(Ogre::Vector3,perpendicular), asCALL_THISCALL); assert( r >= 0 );
		r = engine->data()->RegisterObjectMethod("Vector3", "bool directionEquals(const Vector3& in rhs, const Radian& in tolerance ) const", asMETHOD(Ogre::Vector3,directionEquals), asCALL_THISCALL); assert( r >= 0 );

		// Register the variables
		r = engine->data()->RegisterObjectProperty("Vector3", "Real x", asOFFSET(Ogre::Vector3, x)); assert( r >= 0 );
		r = engine->data()->RegisterObjectProperty("Vector3", "Real y", asOFFSET(Ogre::Vector3, y)); assert( r >= 0 );
		r = engine->data()->RegisterObjectProperty("Vector3", "Real z", asOFFSET(Ogre::Vector3, z)); assert( r >= 0 );
		
		engine->setDefaultNamespace("Ogre::Vector3_" );
			r=engine->data()->RegisterGlobalProperty( "const Ogre::Vector3 ZERO", (void*)&Ogre::Vector3::ZERO); assert( r>=0 );
			r=engine->data()->RegisterGlobalProperty( "const Ogre::Vector3 UNIT_SCALE", (void*)&Ogre::Vector3::UNIT_SCALE); assert( r>=0 );
			r=engine->data()->RegisterGlobalProperty( "const Ogre::Vector3 UNIT_X", (void*)&Ogre::Vector3::UNIT_X); assert( r>=0 );
			r=engine->data()->RegisterGlobalProperty( "const Ogre::Vector3 UNIT_Y", (void*)&Ogre::Vector3::UNIT_Y); assert( r>=0 );
			r=engine->data()->RegisterGlobalProperty( "const Ogre::Vector3 UNIT_Z", (void*)&Ogre::Vector3::UNIT_Z); assert( r>=0 );
			r=engine->data()->RegisterGlobalProperty( "const Ogre::Vector3 NEGATIVE_UNIT_X", (void*)&Ogre::Vector3::NEGATIVE_UNIT_X); assert( r>=0 );
			r=engine->data()->RegisterGlobalProperty( "const Ogre::Vector3 NEGATIVE_UNIT_Y", (void*)&Ogre::Vector3::NEGATIVE_UNIT_Y); assert( r>=0 );
			r=engine->data()->RegisterGlobalProperty( "const Ogre::Vector3 NEGATIVE_UNIT_Z", (void*)&Ogre::Vector3::NEGATIVE_UNIT_Z); assert( r>=0 );
		engine->setDefaultNamespace("Ogre" );
	}
	void NativeScriptAPI::registerOgreVector2()
	{
		int r = SC_OBJECT_CONSTRUCT( engine->data(), "Vector2", "void f()", asFUNCTION(Vector2Wrapper::Constructor0), asCALL_CDECL_OBJLAST ); assert( r>= 0 );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Vector2", "void f( Real )", asFUNCTION(Vector2Wrapper::Constructor1), asCALL_CDECL_OBJLAST ); assert( r>= 0 );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Vector2", "void f( Real, Real )", asFUNCTION(Vector2Wrapper::Constructor2), asCALL_CDECL_OBJLAST ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "bool opEquals( const Vector2 &in ) const", asMETHODPR( Ogre::Vector2, operator==, (const Ogre::Vector2 &) const, bool ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Vector2 opAdd( const Vector2 &in ) const", asMETHODPR( Ogre::Vector2, operator+, (const Ogre::Vector2 &) const, Ogre::Vector2 ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Vector2 opSub( const Vector2 &in ) const", asMETHODPR( Ogre::Vector2, operator-, (const Ogre::Vector2 &) const, Ogre::Vector2 ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Vector2 opMul( const Real ) const", asMETHODPR( Ogre::Vector2, operator*, (const Ogre::Real) const, Ogre::Vector2 ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Vector2 opMul( const Vector2 &in ) const", asMETHODPR( Ogre::Vector2, operator*, (const Ogre::Vector2 &) const, Ogre::Vector2 ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Vector2 opDiv( const Real ) const", asMETHODPR( Ogre::Vector2, operator/, (const Ogre::Real) const, Ogre::Vector2 ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Vector2 opDiv( const Vector2 &in ) const", asMETHODPR( Ogre::Vector2, operator/, (const Ogre::Vector2 &) const, Ogre::Vector2 ), asCALL_THISCALL ); assert( r>= 0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Vector2 opNeg( ) const", asMETHODPR( Ogre::Vector2, operator-, () const, Ogre::Vector2 ), asCALL_THISCALL ); assert( r>= 0 );      
		
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Vector2& opAddAssign( const Vector2 &in )", asMETHODPR( Ogre::Vector2, operator+=, (const Ogre::Vector2&), Ogre::Vector2& ), asCALL_THISCALL ); assert( r>= 0 );      
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Vector2& opAddAssign( const Real ) const", asMETHODPR( Ogre::Vector2, operator+=, ( const Real ), Ogre::Vector2& ), asCALL_THISCALL ); assert( r>= 0 );      

		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Vector2& opSubAssign( const Vector2 &in )", asMETHODPR( Ogre::Vector2, operator-=, (const Ogre::Vector2&), Ogre::Vector2& ), asCALL_THISCALL ); assert( r>= 0 );      
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Vector2& opSubAssign( const Real )", asMETHODPR( Ogre::Vector2, operator-=, ( const Real ), Ogre::Vector2& ), asCALL_THISCALL ); assert( r>= 0 );      
		
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Vector2& opMulAssign( const Vector2 &in )", asMETHODPR( Ogre::Vector2, operator*=, (const Ogre::Vector2&), Ogre::Vector2& ), asCALL_THISCALL ); assert( r>= 0 );      
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Vector2& opMulAssign( const Real )", asMETHODPR( Ogre::Vector2, operator*=, ( const Real ), Ogre::Vector2& ), asCALL_THISCALL ); assert( r>= 0 );      

		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Vector2& opDivAssign( const Vector2 &in )", asMETHODPR( Ogre::Vector2, operator/=, (const Ogre::Vector2&), Ogre::Vector2& ), asCALL_THISCALL ); assert( r>= 0 );      
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Vector2& opDivAssign( const Real )", asMETHODPR( Ogre::Vector2, operator/=, ( const Real ), Ogre::Vector2& ), asCALL_THISCALL ); assert( r>= 0 );      

		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Real length() const", asMETHOD( Ogre::Vector2, length ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Real squaredLength() const", asMETHOD( Ogre::Vector2, squaredLength ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Real distance(const Vector2 &in) const", asMETHOD( Ogre::Vector2, distance ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Real squaredDistance(const Vector2 &in) const", asMETHOD( Ogre::Vector2, squaredDistance ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Real dotProduct( const Vector2 &in ) const", asMETHOD( Ogre::Vector2, dotProduct ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Real normalise( )", asMETHOD( Ogre::Vector2, normalise ), asCALL_THISCALL );
		
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Vector2 midPoint( const Vector2 &in ) const", asMETHOD( Ogre::Vector2, midPoint ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "void makeFloor( const Vector2 &in )", asMETHOD( Ogre::Vector2, makeFloor ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "void makeCeil( const Vector2 &in )", asMETHOD( Ogre::Vector2, makeCeil ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Vector2 perpendicular( ) const", asMETHOD( Ogre::Vector2, perpendicular ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Real crossProduct( const Vector2 &in ) const", asMETHOD( Ogre::Vector2, crossProduct ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Real randomDeviant( Real angle ) const", asMETHOD( Ogre::Vector2, randomDeviant ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "bool isZeroLength( ) const", asMETHOD( Ogre::Vector2, isZeroLength ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Vector2 normalisedCopy() const", asMETHOD( Ogre::Vector2, normalisedCopy ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "Vector2 reflect( const Vector2& in ) const", asMETHOD( Ogre::Vector2, reflect ), asCALL_THISCALL );
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "bool isNaN( ) const", asMETHOD( Ogre::Vector2, isNaN ), asCALL_THISCALL );
		
		r = SC_OBJECT_METHOD( engine->data(), "Vector2", "int opCmp( const Vector2 &in ) const", asFUNCTION(Vector2Wrapper::Compare), asCALL_CDECL_OBJLAST); assert( r >= 0 );
		
		// Register the variables
		r = SC_OBJECT_PROP( engine->data(), "Vector2", "Real x", asOFFSET( Ogre::Vector2, x ) ); assert( r>= 0 );
		r = SC_OBJECT_PROP( engine->data(), "Vector2", "Real y", asOFFSET( Ogre::Vector2, y ) ); assert( r>= 0 );
		engine->setDefaultNamespace("Ogre::Vector2_" );
			r = engine->data()->RegisterGlobalProperty( "const Ogre::Vector2 ZERO", (void*)&Ogre::Vector2::ZERO); assert( r>=0 );
			r = engine->data()->RegisterGlobalProperty( "const Ogre::Vector2 UNIT_SCALE", (void*)&Ogre::Vector2::UNIT_SCALE); assert( r>=0 );
			r = engine->data()->RegisterGlobalProperty( "const Ogre::Vector2 UNIT_X", (void*)&Ogre::Vector2::UNIT_X); assert( r>=0 );
			r = engine->data()->RegisterGlobalProperty( "const Ogre::Vector2 UNIT_Y", (void*)&Ogre::Vector2::UNIT_Y); assert( r>=0 );
			r = engine->data()->RegisterGlobalProperty( "const Ogre::Vector2 NEGATIVE_UNIT_X", (void*)&Ogre::Vector2::NEGATIVE_UNIT_X); assert( r>=0 );
			r = engine->data()->RegisterGlobalProperty( "const Ogre::Vector2 NEGATIVE_UNIT_Y", (void*)&Ogre::Vector2::NEGATIVE_UNIT_Y); assert( r>=0 );
		engine->setDefaultNamespace("Ogre" );
	};
	void NativeScriptAPI::registerOgreVector4()
	{
		int r = SC_OBJECT_CONSTRUCT( engine->data(), "Vector4", "void f()", asFUNCTION(Vector4Wrapper::Constructor0), asCALL_CDECL_OBJLAST ); assert( r>= 0 );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Vector4", "void f( const Real scaler )", asFUNCTION(Vector4Wrapper::Constructor1), asCALL_CDECL_OBJLAST ); assert( r>= 0 );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Vector4", "void f( const Vector3 &in rhs )", asFUNCTION(Vector4Wrapper::ConstructorV3), asCALL_CDECL_OBJLAST ); assert( r>= 0 );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Vector4", "void f( const Vector4 &in rhs )", asFUNCTION(Vector4Wrapper::CopyConstructor), asCALL_CDECL_OBJLAST ); assert( r>= 0 );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Vector4", "void f( const Real x, const Real y, const Real z, const Real w = 1.0f )", asFUNCTION(Vector4Wrapper::Constructor4), asCALL_CDECL_OBJLAST ); assert( r>= 0 );

		// Register the variables
		r = SC_OBJECT_PROP( engine->data(), "Vector4", "Real x", asOFFSET( Ogre::Vector4, x ) ); assert( r>= 0 );
		r = SC_OBJECT_PROP( engine->data(), "Vector4", "Real y", asOFFSET( Ogre::Vector4, y ) ); assert( r>= 0 );
		r = SC_OBJECT_PROP( engine->data(), "Vector4", "Real z", asOFFSET( Ogre::Vector4, z ) ); assert( r>= 0 );
		r = SC_OBJECT_PROP( engine->data(), "Vector4", "Real w", asOFFSET( Ogre::Vector4, w ) ); assert( r>= 0 );

		// Functions
		r = SC_OBJECT_METHOD( engine->data(), "Vector4", "bool opEquals( const Vector4 &in ) const", asMETHODPR( Ogre::Vector4, operator==, (const Ogre::Vector4&) const, bool ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector4", "Vector4 opAdd( const Vector4 &in ) const", asMETHODPR( Ogre::Vector4, operator+, (const Ogre::Vector4&) const, Ogre::Vector4 ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector4", "Vector4 opSub( const Vector4 &in ) const", asMETHODPR( Ogre::Vector4, operator-, (const Ogre::Vector4&) const, Ogre::Vector4 ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector4", "Vector4 opMul( const Real ) const", asMETHODPR( Ogre::Vector4, operator*, (const Ogre::Vector4&) const, Ogre::Vector4 ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector4", "Vector4 opMul( const Vector4 &in ) const", asMETHODPR( Ogre::Vector4, operator*, (const Ogre::Vector4&) const, Ogre::Vector4 ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector4", "Vector4 opDiv( const Real ) const", asMETHODPR( Ogre::Vector4, operator/, (const Ogre::Vector4&) const, Ogre::Vector4 ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector4", "Vector4 opDiv( const Vector4 &in ) const", asMETHODPR( Ogre::Vector4, operator/, (const Ogre::Vector4&) const, Ogre::Vector4 ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector4", "Vector4 opNeg( ) const", asMETHODPR( Ogre::Vector4, operator-, () const, Ogre::Vector4 ), asCALL_THISCALL ); assert( r>=0 );

		r = SC_OBJECT_METHOD( engine->data(), "Vector4", "Vector4& opAddAssign( const Vector4 &in )", asMETHODPR( Ogre::Vector4, operator+=, ( const Ogre::Vector4& ), Ogre::Vector4& ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector4", "Vector4& opSubAssign( const Vector4 &in )", asMETHODPR( Ogre::Vector4, operator-=, ( const Ogre::Vector4& ), Ogre::Vector4& ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector4", "Vector4& opMulAssign( const Real )", asMETHODPR( Ogre::Vector4, operator*=, ( const Real ), Ogre::Vector4& ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector4", "Vector4& opAddAssign( const Real )", asMETHODPR( Ogre::Vector4, operator+=, ( const Real ), Ogre::Vector4& ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector4", "Vector4& opSubAssign( const Real )", asMETHODPR( Ogre::Vector4, operator-=, ( const Real ), Ogre::Vector4& ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector4", "Vector4& opMulAssign( const Ogre::Vector4 &in )", asMETHODPR( Ogre::Vector4, operator*=, ( const Ogre::Vector4& ), Ogre::Vector4& ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector4", "Vector4& opDivAssign( const Real )", asMETHODPR( Ogre::Vector4, operator/=, ( const Real ), Ogre::Vector4& ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector4", "Vector4& opDivAssign( const Ogre::Vector4 &in )", asMETHODPR( Ogre::Vector4, operator/=, ( const Ogre::Vector4 & ), Ogre::Vector4& ), asCALL_THISCALL ); assert( r>=0 );

		r = SC_OBJECT_METHOD( engine->data(), "Vector4", "Real dotProduct( const Vector4 &in other ) const", asMETHOD( Ogre::Vector4, dotProduct ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Vector4", "bool isNaN( ) const", asMETHOD( Ogre::Vector4, isNaN ), asCALL_THISCALL ); assert( r>=0 );
		engine->setDefaultNamespace("Ogre::Vector4_" );
		r=engine->data()->RegisterGlobalProperty( "const Ogre::Vector4 ZERO", (void*)&Ogre::Vector4::ZERO); assert( r>=0 );
		engine->setDefaultNamespace("Ogre" );
	}
	void NativeScriptAPI::registerOgreMatrix3(){
		int r = 0;
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Matrix3", "void f()", asFUNCTION(Matrix3Wrapper::Constructor0), asCALL_CDECL_OBJLAST ); assert( r>= 0 );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Matrix3", "void f( const Matrix3 &in rhs )", asFUNCTION(Matrix3Wrapper::CopyConstructor), asCALL_CDECL_OBJLAST ); assert( r>= 0 );
		r = SC_OBJECT_CONSTRUCT( engine->data(), "Matrix3", "void f( Real, Real, Real, Real, Real, Real, Real, Real, Real )", asFUNCTION(Matrix3Wrapper::CopyConstructor), asCALL_CDECL_OBJLAST ); assert( r>= 0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "Vector3 getColumn( uint col ) const", asMETHOD( Ogre::Matrix3, GetColumn ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "void setColumn( uint col, const Vector3 &in vec ) const", asMETHOD( Ogre::Matrix3, SetColumn ), asCALL_THISCALL ); assert( r>= 0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "void fromAxes( const Vector3 &in xAxis, const Vector3 &in yAxis, const Vector3 &in zAxis )", asMETHOD( Ogre::Matrix3, GetColumn ), asCALL_THISCALL ); assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "bool opEquals( const Matrix3 &in ) const", asMETHOD( Ogre::Matrix3, operator == ), asCALL_THISCALL ); assert( r>= 0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "Matrix3 opAdd( const Matrix3 &in ) const", asMETHODPR( Ogre::Matrix3, operator +, ( const Ogre::Matrix3 & ) const, Ogre::Matrix3 ), asCALL_THISCALL );  assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "Matrix3 opSub( const Matrix3 &in ) const", asMETHODPR( Ogre::Matrix3, operator -, ( const Ogre::Matrix3 & ) const, Ogre::Matrix3 ), asCALL_THISCALL );  assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "Matrix3 opMul( const Matrix3 &in ) const", asMETHODPR( Ogre::Matrix3, operator *, ( const Ogre::Matrix3 & ) const, Ogre::Matrix3 ), asCALL_THISCALL );  assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "Matrix3 opSub( ) const", asMETHODPR( Ogre::Matrix3, operator -, ( ) const, Ogre::Matrix3 ), asCALL_THISCALL );  assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "Vector3 opMul( const Vector3 &in ) const", asMETHODPR( Ogre::Matrix3, operator *, ( const Ogre::Vector3 & ) const, Ogre::Vector3 ), asCALL_THISCALL );  assert( r>= 0 );
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "Matrix3 opMul( Real scalar ) const", asMETHODPR( Ogre::Matrix3, operator *, ( Ogre::Real ) const, Ogre::Matrix3 ), asCALL_THISCALL );  assert( r>= 0 );
		
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "Matrix3 transpose() const", asMETHOD( Ogre::Matrix3, Transpose ), asCALL_THISCALL ); assert( r>=0 );
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "bool inverse( Matrix3&out, Real tolerance = 1e-06 ) const", asMETHODPR( Ogre::Matrix3, Inverse, ( Ogre::Matrix3&, Ogre::Real ) const, bool ), asCALL_THISCALL ); assert(r>=0);
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "Matrix3 inverse( Real tolerance = 1e-06 ) const", asMETHODPR( Ogre::Matrix3, Inverse, ( Ogre::Real ) const, Ogre::Matrix3 ), asCALL_THISCALL ); assert(r>=0);
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "Real determinant() const", asMETHODPR( Ogre::Matrix3, Determinant, ( ) const, Ogre::Real ), asCALL_THISCALL ); assert(r>=0);

		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "void singularValueDecomposition( Matrix3 &out, Vector3 &out, Matrix3 &out ) const", asMETHOD( Ogre::Matrix3, SingularValueDecomposition ), asCALL_THISCALL ); assert(r>=0);
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "void singularValueComposition( const Matrix3 &in, const Vector3 &in, const Matrix3 &in) const", asMETHOD( Ogre::Matrix3, SingularValueComposition ), asCALL_THISCALL ); assert(r>=0);
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "void orthoNormalize()", asMETHOD( Ogre::Matrix3, Orthonormalize ), asCALL_THISCALL ); assert(r>=0);
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "void qduDecomposition( Matrix3 &out, Vector3 &out, Matrix3 &out ) const", asMETHOD( Ogre::Matrix3, QDUDecomposition ), asCALL_THISCALL ); assert(r>=0);

		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "Real spectralNorm() const", asMETHOD( Ogre::Matrix3, SpectralNorm ), asCALL_THISCALL ); assert(r>=0);
		
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "void toAxisAngle( Vector3 &out, Radian & out ) const", asMETHODPR( Ogre::Matrix3, ToAngleAxis, ( Ogre::Vector3 &, Ogre::Radian & ) const, void ), asCALL_THISCALL ); assert(r>=0);
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "void toAxisAngle( Vector3 &out, Degree & out ) const", asMETHODPR( Ogre::Matrix3, ToAngleAxis, ( Ogre::Vector3 &, Ogre::Degree & ) const, void ), asCALL_THISCALL ); assert(r>=0);
		
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "void fromAxisAngle( const Vector3 &in, const Radian &in )", asMETHODPR( Ogre::Matrix3, FromAngleAxis, ( const Ogre::Vector3 &, const Ogre::Radian & ), void ), asCALL_THISCALL ); assert(r>=0);
		
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "bool toEulerAnglesXYZ( Radian &out, Radian &out, Radian &out )", asMETHODPR( Ogre::Matrix3, ToEulerAnglesXYZ, ( Ogre::Radian &, Ogre::Radian &, Ogre::Radian & ) const, bool ), asCALL_THISCALL ); assert(r>=0);
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "bool toEulerAnglesXZY( Radian &out, Radian &out, Radian &out )", asMETHODPR( Ogre::Matrix3, ToEulerAnglesXZY, ( Ogre::Radian &, Ogre::Radian &, Ogre::Radian & ) const, bool ), asCALL_THISCALL ); assert(r>=0);
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "bool toEulerAnglesYXZ( Radian &out, Radian &out, Radian &out )", asMETHODPR( Ogre::Matrix3, ToEulerAnglesYXZ, ( Ogre::Radian &, Ogre::Radian &, Ogre::Radian & ) const, bool ), asCALL_THISCALL ); assert(r>=0);
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "bool toEulerAnglesYZX( Radian &out, Radian &out, Radian &out )", asMETHODPR( Ogre::Matrix3, ToEulerAnglesYZX, ( Ogre::Radian &, Ogre::Radian &, Ogre::Radian & ) const, bool ), asCALL_THISCALL ); assert(r>=0);
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "bool toEulerAnglesZXY( Radian &out, Radian &out, Radian &out )", asMETHODPR( Ogre::Matrix3, ToEulerAnglesZXY, ( Ogre::Radian &, Ogre::Radian &, Ogre::Radian & ) const, bool ), asCALL_THISCALL ); assert(r>=0);
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "bool toEulerAnglesZYX( Radian &out, Radian &out, Radian &out )", asMETHODPR( Ogre::Matrix3, ToEulerAnglesZYX, ( Ogre::Radian &, Ogre::Radian &, Ogre::Radian & ) const, bool ), asCALL_THISCALL ); assert(r>=0);
		
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "void fromEulerAnglesXYZ( const Radian &in, const Radian &in, const Radian &in )", asMETHODPR( Ogre::Matrix3, FromEulerAnglesXYZ, ( const Ogre::Radian &, const Ogre::Radian &, const Ogre::Radian & ), void ), asCALL_THISCALL ); assert(r>=0);
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "void fromEulerAnglesXZY( const Radian &in, const Radian &in, const Radian &in )", asMETHODPR( Ogre::Matrix3, FromEulerAnglesXZY, ( const Ogre::Radian &, const Ogre::Radian &, const Ogre::Radian & ), void ), asCALL_THISCALL ); assert(r>=0);
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "void fromEulerAnglesYXZ( const Radian &in, const Radian &in, const Radian &in )", asMETHODPR( Ogre::Matrix3, FromEulerAnglesYXZ, ( const Ogre::Radian &, const Ogre::Radian &, const Ogre::Radian & ), void ), asCALL_THISCALL ); assert(r>=0);
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "void fromEulerAnglesYZX( const Radian &in, const Radian &in, const Radian &in )", asMETHODPR( Ogre::Matrix3, FromEulerAnglesYZX, ( const Ogre::Radian &, const Ogre::Radian &, const Ogre::Radian & ), void ), asCALL_THISCALL ); assert(r>=0);
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "void fromEulerAnglesZXY( const Radian &in, const Radian &in, const Radian &in )", asMETHODPR( Ogre::Matrix3, FromEulerAnglesZXY, ( const Ogre::Radian &, const Ogre::Radian &, const Ogre::Radian & ), void ), asCALL_THISCALL ); assert(r>=0);
		r = SC_OBJECT_METHOD( engine->data(), "Matrix3", "void fromEulerAnglesZYX( const Radian &in, const Radian &in, const Radian &in )", asMETHODPR( Ogre::Matrix3, FromEulerAnglesZYX, ( const Ogre::Radian &, const Ogre::Radian &, const Ogre::Radian & ), void ), asCALL_THISCALL ); assert(r>=0);
		engine->setDefaultNamespace("Ogre::Matrix3_" );
			r=engine->data()->RegisterGlobalProperty( "const Ogre::Matrix3 ZERO", (void*)&Ogre::Matrix3::ZERO); assert( r>=0 );
			r=engine->data()->RegisterGlobalProperty( "const Ogre::Matrix3 IDENTITY", (void*)&Ogre::Matrix3::IDENTITY); assert( r>=0 );
			r=engine->data()->RegisterGlobalProperty( "const Ogre::Real EPSILON", (void*)&Ogre::Matrix3::EPSILON); assert( r>=0 );
		engine->setDefaultNamespace("Ogre" );
	}
	void NativeScriptAPI::registerOgreMatrix4(){
		int r = 0;
	}
};
